import { createApp } from 'vue'
import { globalRegister } from './global'
import hyRequest from './service'
import App from './App.vue'
import router from './router'
import store from './store'
import { setupStore } from './store'
import 'normalize.css'
import './assets/css/index.less'
const app = createApp(App).use(store).use(globalRegister)
setupStore()
app.use(router).mount('#app')
// hyRequest.request({
//   url: '/home/multidata',
//   method: 'GET',
//   headers: {},
//   interceptors: {
//     requestInterceptor: (config) => {
//       console.log('单独请求的config')
//       config.headers['token'] = '123'
//       return config
//     },
//     responseInterceptor: (res) => {
//       console.log('单独响应的response')
//       return res
//     }
//   }
// })

interface DataType {
  data: any
  returnCode: string
  success: boolean
}

// hyRequest
//   .post<any>({
//     url: 'http://192.168.1.230:8000/upload',
//     data: { index: 1, cmd: 'update_face_batch_result' }
//   })
//   .then((res) => {
//     console.log(res.data)
//     console.log(res.returnCode)
//     console.log(res.success)
//   })
